#pragma once
#include <iostream>
#include <string>
#define Die(data)   \
	do              \
	{               \
		exit(data); \
	} while (0);

#define CONV(v) (struct sockaddr *)(v)

bool separate(const std::string &file,std::string *left,std::string *right,const std::string &sep)
{
	auto pos = file.find(sep);
	if(pos == std::string::npos) return false;
	*left = file.substr(0,pos);
	*right = file.substr(pos+sep.size(),file.size());
	if(left->empty() || right->empty()) return false;
	return true;
}